﻿using Microsoft.ManagementConsole;
using System.ComponentModel;
using System.Security.Permissions;
using System;
using System.Collections.Generic;
using System.Text;
using SolidQ.SQLServerManagement;

[assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Unrestricted = true)]
namespace SolidQTools.SQLServerManagement
{
    /// <summary>
    /// The RunInstaller attribute allows the .Net framework to install the assembly.
    /// </summary>
    [RunInstaller(true)]
    public class DistributedReplaySnapInstaller : SnapInInstaller
    {
    }

    /// <summary>
    /// Provides the main entry point for the creation of a snap-in. 
    /// </summary>
    [SnapInSettings("{9627F1F3-A6D2-4cf8-90A2-10F85A7A4EE7}",DisplayName = "Distributed Replay GUI",Description = "SolidQ Distributed Replay GUI.",Vendor="SolidQ")]
    public class DistributedReplaySnapIn : SnapIn
    {
        /// <summary>
        /// Constructor.
        /// </summary>
        public DistributedReplaySnapIn()
        {
            // Create the root node.
            this.RootNode = new ScopeNode();
            this.RootNode.DisplayName = "Distributed Replay GUI";

            // Create a form view for the root node.
            FormViewDescription fvd = new FormViewDescription();
            fvd.DisplayName = "Setup (FormView)";
            fvd.ViewType = typeof(SelectionFormView);
            fvd.ControlType = typeof(SelectionControl);

            // Attach the view to the root node.
            this.RootNode.ViewDescriptions.Add(fvd);
            this.RootNode.ViewDescriptions.DefaultIndex = 0;
        }
    }

    
}
